package top.purity.server.tenant.domain;

import jakarta.persistence.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.Comment;
import top.purity.framework.orm.BaseDO;

/**
 * @version 1.0
 * @Author Lmh
 * @Description
 * @CreateTime 2023-09-24 15:16
 */

@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "tenant_user_menu",
        uniqueConstraints = {
                @UniqueConstraint(columnNames = {"menu_id", "tenant_id"})
        }, indexes = {
        @Index(name = "idx_mi", columnList = "menu_id"),
        @Index(name = "idx_ti", columnList = "tenant_id")
})
public class TenantUserMenu extends BaseDO {
    @Column(name = "menu_id", nullable = false)
    @Comment("菜单id")
    private Long menuId;
    @Column(name = "tenant_id", nullable = false)
    @Comment("租户id")
    private Long tenantId;

}
